package ooday04;
//static 的演示
public class StaticDemo {
    public static void main(String[] args) {
        StaticVar o1 = new StaticVar();
        o1.show();//1,1
        StaticVar o2 = new StaticVar();
        o2.show();//1,2
        StaticVar o3 = new StaticVar();
        o3.show();//1,3
        System.out.println(StaticVar.b);//静态通常有类名.  的方式来访问

        System.out.println("------------------------------------");
        StaticBlock o4 = new StaticBlock();//静态块  构造方法
        StaticBlock o5 = new StaticBlock();//构造方法
    }
}
